package y23.Oct;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Test15 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        int x = 0;
        int y = 0;
        int count = 0;
        ArrayList<String> strList = new ArrayList<>();
        for (int i = 0; i < str.length(); i++) {
            if(str.charAt(i)=='"'){
                x = i+1;
                do{
                    i++;
                }while (str.charAt(i)!='"');
                count++;
                y = i-1;
                strList.add(str.substring(x,y));
            }else{
                x=i;
                do {
                    i++;
                }while (str.charAt(i)!=' '||i==str.length()-1);
                y = i;
                strList.add(str.substring(x,y));
                count++;
            }

        }
        System.out.println(count);
    }
}
